Skip to content

[pull] main from microsoft:main - #1615

Merged
pull[bot] merged 15 commits into
code:mainfrom
microsoft:main
Aug 21, 2026
Merged

[pull] main from microsoft:main#1615
pull[bot] merged 15 commits into
code:mainfrom
microsoft:main

Conversation

@pull

@pull pull Bot commented Aug 21, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

connor4312 and others added 15 commits August 20, 2026 22:54
* inline chat: add experimental Agent Host backend

Adds an experiment-gated (`chat.inlineChat.agentHost.enabled`, default off)
Agent Host backend for editor inline chat, following the terminal chat
migration. When disabled, inline chat behaves exactly as before.

Because the Agent Host writes files directly to disk rather than streaming
edits, review UI is hydrated from before/after snapshots instead:

- `InlineChatSessionResolver` picks the Agent Host or the legacy local
  session, falling back on any failure and treating cancellation as
  cancellation rather than fallback.
- `IChatEditReviewSession` is extracted as a narrow supertype of
  `IChatEditingSession` so a surface can supply reviewable entries without
  implementing checkpoints, storage, streaming edits or multi-diff.
  `editingSessionsObs` is typed to it, keeping editor-level review UI
  (decorations, hunk keep/undo, accessibility) working.
- `InlineChatEditReviewSession` implements only that surface. It saves and
  snapshots the target, locks it read-only for the turn, and reuses
  `ChatEditingModifiedDocumentEntry` so diffing and hunk review come for
  free. Turns are bracketed with `startExternalEdit`/`stopExternalEdit` so
  disk-driven model reloads render in real time and stay cumulative across
  follow-up turns.
- `IFilesConfigurationService.updateReadonly` accepts an `IMarkdownString`
  so a programmatic lock can explain itself instead of offering the generic
  "set writeable" affordance.

Notebooks and untitled documents deliberately stay on the legacy path.

Also fixes a pre-existing leak where every non-local session was written to
the chat history index regardless of location, so throwaway inline (and
terminal) sessions appeared in the session list.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* inline chat: track off-target agent edits in real time

The Agent Host emits an `externalEdit` progress part as each tool call
completes, so files the agent touches outside the inline-chat target can be
discovered during the turn rather than only at its end.

`InlineChatEditReviewSession` now watches the response for those parts and
creates a review entry as soon as one appears, seeding its baseline from the
part's `beforeContentUri`. That baseline is the only trustworthy "before" for
an off-target file: the agent writes to disk before announcing the edit, so
reading current content would silently yield an empty diff. Entries enter
external-edit mode so subsequent disk reloads keep their diffs live, matching
the target file. `endTurn` keeps its sweep as an idempotent safety net.

Deletes and renames are skipped — neither maps cleanly onto a single-URI
`IModifiedFileEntry`.

Fixes two attribution races that would drop agent edits from the diff:

- A newly created entry was published through `entries` before external-edit
  mode was on, so an observer could see it and a disk reload could land in
  that window and be rebased into the baseline as a user edit.
- An off-target entry carried over from an earlier turn only re-entered
  external-edit mode once its part arrived, but the disk write precedes the
  announcement. All tracked entries now enter external-edit mode at
  `beginTurn`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* inline chat: add experimental Agent Host backend

Adds an Agent Host backend for editor inline chat. The setting
`chat.inlineChat.agentHost.enabled` controls it and is off by default. When the setting is
off, inline chat operates as before.

The Agent Host writes files to disk. It does not stream edits into the editor. Inline chat
therefore builds its review UI from before/after snapshots.

- Adds `InlineChatSessionResolver`. It selects the Agent Host session or the legacy local
  session. It falls back to the legacy session on failure. It does not fall back when the
  user cancels.
- Extracts `IChatEditReviewSession` as a supertype of `IChatEditingSession`. A surface can
  supply reviewable entries without checkpoints, storage, streaming edits, or multi-diff.
  Editor review UI, such as decorations and keep/undo, continues to operate.
- Adds `InlineChatEditReviewSession`. It saves and snapshots the target file, makes the file
  read-only for the turn, and reuses `ChatEditingModifiedDocumentEntry`. Diff decorations and
  hunk review operate without new diff code.
- Shows diff decorations in real time. Each turn starts and stops external-edit mode, so disk
  reloads count as agent edits. The diff stays cumulative across turns.
- Tracks the files that the agent edits outside the target file. The Agent Host announces each
  edit when a tool call completes. The baseline content comes from that edit.
- Lets `IFilesConfigurationService.updateReadonly` accept an `IMarkdownString`. A programmatic
  lock can then show its own reason.
- Shows the current agent operation in the inline input placeholder.
- Keeps notebooks and untitled documents on the legacy path.

Makes throwaway (ephemeral) sessions start and run more quickly:

- Disables MCP servers, subagents, and custom agents for these sessions.
- Skips the turn-start checkpoint. This work is on the critical path of each turn.
- Skips title generation and the rename instruction. The title is never shown.
- Adds `enabledForEphemeralSessions` to server tool definitions. A tool must opt in before an
  ephemeral session receives it.

Also keeps throwaway sessions out of the session lists. The host no longer sends
`root/sessionAdded` for an ephemeral session. The chat history index no longer stores an
external session from a transient surface.

(Commit message generated by Copilot)

* inline chat: address review feedback and fixture failures

- Adds `getEditingSession` to the two component fixture mocks of `IChatEditingService`. The
  chat widget now calls this method, so the fixtures failed to render.
- Cancels the turn when the pre-turn save is cancelled. The buffer stays dirty in that case,
  so the end-of-turn revert discarded the unsaved work of the user.
- Records a created off-target file with `ChatEditKind.Created`. A rejection then deletes the
  file instead of leaving empty content on disk.
- Cancels the request when turn preparation fails. Before this change the agent could write
  files while the file was not read-only and no review baseline existed.
- Examines the session map again after the Agent Host resolves. Before this change two
  controllers for one file could each create a session.
- Corrects the comment about custom agents for ephemeral sessions. The SDK can still find
  agents in the plugin directories.

(Commit message generated by Copilot)

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Align chat pill chevron and show entry paths in dropdown hovers

The chevron glyph is drawn above the middle of its box, so it read as sitting too high next to the label; nudge it onto the label's optical centre. Resource pills tighten their file icon slot and leading padding.

Customization entries now carry a hover with the path relative to the session folder that holds them (prefixed with the folder name when the session spans several), falling back to the absolute path. Artifact entries show their URI or link.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: Keep pill hover details accessible

Separate visual hover content from plain-text descriptions and actionable labels so artifact locations remain visible without replacing pill action names. Cover dropdown forwarding and single-entry ARIA labels.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* server: reject agent commands in remote CLI

Prevent the remote CLI from treating unsupported agent subcommands as file paths.

- Detect agent commands before the remote CLI filters and parses its options.
- Return a clear error and nonzero exit code instead of opening command arguments as files.
- Add focused tests for global options, option values, and the option terminator.

Fixes #329934

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* server: align agent guard parsing

- Recognize deprecated option IDs when skipping option values.
- Stop scanning when another top-level subcommand appears first.
- Add regression coverage for deprecated options and competing subcommands.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Defer breadcrumbs reveal layout measurement

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: pause plugin auto-updates on metered connections

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: avoid plugin update lifecycle races

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: simplify metered plugin updates

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Preserve plugin update startup idle gate

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: coalesce plugin update checks

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Handle cancelled plugin update checks

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Coordinate plugin checks with queued updates

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* update: respect metered connections

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix deferred metered update handling

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix deferred metered update resumption

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix metered update ordering races

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Refactor AgentService instantiation

Create an agent-host application DI scope, construct AgentService through it, and remove child-to-parent service re-exports. Update tests to use the production construction path. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Clarify Agent Host DI scope names

Use explicit bootstrap and application names for service collections and instantiation services. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Share Agent Host service initialization

Use one strict DI scope and centralize common base and provider service setup for both Agent Host entry points. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Streamline Agent Host runtime creation

Expose one runtime factory that owns common file, session, DI, AgentService, diagnostics, and optional provider infrastructure initialization. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Move AgentService composition to runtime

Construct and register the AgentService core and collaborator graph outside AgentService, use one guarded initialization step for genuine back-references, and replace the test-only clock injection with virtual timers. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Use one complete Agent Host runtime graph

Remove optional provider-infrastructure setup, make BYOK policy explicit, and defer Claude SDK environment mutation until first use. (Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix Agent Host integration fixtures

Keep mock-provider configuration distinct from host-owned worktree settings and use an existing workspace for permission containment tests.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Restore Claude SDK initialization behavior

Keep the AgentService DI refactor focused by leaving the existing Claude SDK environment setup unchanged.

(Written by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…31844)

* reasoning ux: fix tools jumping + split reasoning summary headers

* fix jump

* fix reasoning ux
* sessions: keep ignored blocked sessions ignored

Ignoring a blocked session (e.g. "Ignore CI Failure") only held until the
user opened another session or the new-session view, after which the title
bar surfaced the very same block again. Two independent causes:

- `BlockedSessionsIndicatorModel` - the sole owner of the acknowledged
  occurrences - was created by `SessionsTitleBarWidget`, a command center
  action view item. The command center refreshes when `isNewChatSession`
  changes, disposing and re-creating its view items, which discarded every
  acknowledgement. Ownership moves to `SessionsTitleBarContribution`, which
  outlives those rebuilds and now also owns `SessionActionFeedback`.

- `BlockedSessions` held its ref-counted GitHub pull request and CI model
  references on the reader's store, which is disposed *before* each
  recompute. Every session change therefore dropped the last reference,
  disposed the shared models and re-created empty ones, so the session
  briefly left the blocked set - and the cleanup autorun read that gap as
  "no longer blocked" and released the acknowledgement. Those references
  move to the reader's `delayedStore`, and a failing-CI acknowledgement
  (keyed by the failing commit) is now kept while a session is transiently
  absent, so only a new failing commit resurfaces it.

Both models now trace their decisions (`[BlockedSessions]`,
`[BlockedSessionsIndicator]`, `[SessionsTitleBar]`), covering the raw
blocked set per recompute, every acknowledgement added/kept/released with
its reason, blink queuing, the surfaced set, and command center widget
churn, so a resurfacing session can be diagnosed from the logs alone.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* sessions: correct SessionActionFeedback ownership documentation

Its class JSDoc still said the title bar widget owns the instance, which
contradicted the move of that ownership to SessionsTitleBarContribution.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* pet: add achievements and accessory rewards

Add persistent cross-window pet achievements with six enabled rewards, a standalone collection modal, account badges, and semantic unlock triggers. Add the body-owned accessory rig and atlases, unlock star and New state, accessibility help, fixtures, and tests while retaining disabled rewards for later re-enablement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5c8a4f1e-3bb0-4d6f-a3ed-249fbcd4ce15

* pet: address achievement review feedback

Defer customization observation until the pet is enabled, detect newly installed MCP servers independently of enablement, and fully clear legacy fork state on reset. Rename the Crown persistence ID and use contrast-paired badge colors for the New affordance.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5c8a4f1e-3bb0-4d6f-a3ed-249fbcd4ce15

* pet: update model and skill rewards

Reward changing the model picker selection with the Construction Hard Hat, and reward adding a custom skill with the Crown. Keep the instructions achievement and Sailor Hat disabled for future use.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5c8a4f1e-3bb0-4d6f-a3ed-249fbcd4ce15

* pet: fix component fixture asset loading

Serve pet fixture media from the source tree used by both Vite and the CI rspack server, remove the intentionally empty screenshot variant, and approve the new blocking fixture snapshots.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5c8a4f1e-3bb0-4d6f-a3ed-249fbcd4ce15

* pet: accept component fixture screenshots

Record the authoritative Linux CI hashes for the new blocking pet achievement and accessory fixtures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5c8a4f1e-3bb0-4d6f-a3ed-249fbcd4ce15

* pet: restore fake timers within unlock test

Avoid leaving the renderer test clock installed after the unlock-state interaction test so later notebook and notification suites can advance timers normally.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5c8a4f1e-3bb0-4d6f-a3ed-249fbcd4ce15

* remove unused achievements for now

* pet: remove unrelated branch changes

Restore server command, session artifact, and chat pill files to current main after they were accidentally included with the dormant achievement cleanup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 5c8a4f1e-3bb0-4d6f-a3ed-249fbcd4ce15

---------

Copilot-Session: 5c8a4f1e-3bb0-4d6f-a3ed-249fbcd4ce15
* agentHost: add semantic search tool

* Refactor agent host tool enablement logic and enhance semantic search documentation

* agentHost: reserve semantic search tool names

* agentHost: remove unused semantic search tool ID and update related logic

* agentHost: fix semantic search tool hygiene

* Refactor semantic search tool instructions for clarity and consolidation

* agentHost: fix semantic search tool identity

* agentHost: publish tools before starting turns

* agentHost: trim semantic search scope

* agentHost: fix semantic search execution

* copilot: remove semantic search mode experiment
Defer dynamic model setting schemas

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…sControl (#331772)

* Initial plan

* Only swap Alt-hold close action for the hovered tab

Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benibenj <44439583+benibenj@users.noreply.github.com>
…t first (#331723)

* Agent Host changes for osortega/agents/review-chatfindmodel-widget-editor

* chat: index only the text a response renders in Find

Find counted matches that had no DOM node to land on, so the result count
overstated the total and navigation walked past positions it could never
reach. Three separate causes, each fixed where the text is indexed rather
than compensated for during navigation:

- Markdown link targets were indexed. `renderAsPlaintext` emitted a list
  item's raw source instead of parsing its tokens, so a link kept its
  target: a response listing its edits as `[src/](/some/path)` indexed the
  path, of which only the label renders. Adds an opt-in
  `parseListItemTokens` so the 90+ existing callers are unaffected.

- Filtered responses were indexed. The renderer drops the references slot,
  the body and the citations for a filtered response, keeping only the
  error message, which also shifted every predicted part index for the row.

- Parts merged into one block were fused. Plaintext is trimmed per part and
  then concatenated, so `See ` + `foo.ts` + ` for details` was indexed as
  `Seefoo.tsfor details`, hiding text that is plainly on screen.

Removes `dropActiveMatch`, which existed to correct the count after the
fact and made the total change as the user navigated.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: name the plaintext option for what it guarantees

`parseListItemTokens` described marked's data model rather than the
output, and named only the case that surfaced the bug: the option also
reduces bold, emphasis and code spans, and swaps the block-level text
renderer. `omitMarkdownSyntax` states what the caller gets, so a future
leak fixed in another renderer folds in without a second option.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: address Find review feedback

- Only schedule a debounced search when the query or options differ from
  what the model last searched. An option toggle reaches `_onInputChanged`
  after the base state listener has already run `findFirst`, so the second,
  identical search left Enter flushing it instead of advancing a match.

- Keep a segment's *last* `limit` matches. The per-segment cap was applied
  before the array was reversed, so a single over-limit segment retained its
  oldest occurrences and dropped the newest ones navigation reaches first.

- Yield once before the result count snapshots state. `FindInput.onDidChange`
  fires before the `onInput` handler that schedules the search, so the waiter
  saw nothing pending and reported the previous query's matches.

- Condense multi-line method-body comments to one line.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chat: separate a nested list from the item holding it

Verified `renderAsPlaintext` against the vendored marked and found two
things wrong with the list-item change.

Parsing a tight item's tokens with `top = false` skips the paragraph
treatment that gives block content a boundary, so an item holding a nested
list ran straight into it: `- outer\n  - inner [link](/t)` produced
`outerinner link`. Parsing as top-level restores the break and also drops a
redundant blank line from loose lists.

The two new assertions expected a single newline between list items where
marked emits two; `renderer.list` joins items that already end in one.
Default output is unchanged in every case, including the pre-existing
plaintext suite.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Dispose archived Agents terminals

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix worktree terminal test narrowing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Guard late archive terminal cleanup

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* comments

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Aug 21, 2026
@pull pull Bot added the ⤵️ pull label Aug 21, 2026
@pull
pull Bot merged commit 07c20d9 into code:main Aug 21, 2026
10 of 24 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants